//配置当前小程序的环境变量
var API = require('./config');
//获取当前小程序的账号信息
const miniProgram = wx.getAccountInfoSync();

//获取小程序的版本
const {envVersion} = miniProgram
//创建基本路径变量
let env = {
  baseURL:'https://gmall-prod.atguigu.cn/mall-api'
}

switch (envVersion) {
  case 'develop':
    env.baseURL = API.API
    break

  case 'trial':
    env.baseURL = API.API
    break

  case 'release':
    env.baseURL = 'https://gmall-prod.atguigu.cn/mall-api'
    break
        
  default:
    env.baseURL = API.API
    break
}

export {env}